﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Sockets;
using System.Net;

using NATP2P.STUN;
using NATP2P.UDPNat;


namespace TestConsole
{
    class Program
    {
        static void Main(string[] args)
        {

            EndPointMapRequest res = new EndPointMapRequest(2012, "stun.stunprotocol.org");

            res.Send(); res.Send();
            Console.WriteLine(res.ExternalEndPoint.Address + ":" + res.ExternalEndPoint.Port);

            // Console.WriteLine("hello");
            Console.WriteLine(res.InternalEndPoint.Address + ":" + res.InternalEndPoint.Port);
            Console.WriteLine(res.RemoteServer.Address + ":" + res.RemoteServer.Port);
            // Console.WriteLine(StunServers.Server[2].Address);
            res.Dispose();


            Console.ReadKey();
        }
    }
}
